$(document).ready(function () {
	var uLister = _$("uLister")._$id();
	var elements = uLister.getElementsByTagName("a");
	var classCur = 'tz_ul show', classHide = 'tz_ul hide';
	
	for(var i=0,len=elements.length; ++i < len ;){
		
		(function(i){
			
			var element = elements[i];
			
			element['onclick'] = function(){
				
				for(var n=0,len=elements.length; ++n < len ;){
				
					var elementId = _$("layer"+n)._$id();
					
					elementId['className'] = classHide;
					elements[n]['className'] ='';
				}
				var elementId = _$("layer"+i)._$id();
				
				elementId['className']= classCur;
				element['className']='cur';
			}
			
		})(i)
	}

	if (parseInt(document.getElementById('announce_num')) == 0)
	{
		$('#tab_all_notifications').click();
	}
	
	bp_more_load(G_BASE_URL + '/notifications/ajax/list/flag-1', $('#bp_new_more'), $('#c_new_list'));
	
	bp_more_load(G_BASE_URL + '/notifications/ajax/list/', $('#bp_all_more'), $('#c_all_list'));
});